const router = require('express').Router()
const roomCtr = require('../controller/room')
const auth = require('../middleware/auth')


// 创建房间
router.post('/room',auth,roomCtr.createRoom)

// 删除房间
router.delete('/room',auth,roomCtr.deleteRoom)

// 获取房间信息
router.get('/room',roomCtr.getRoomData)

// 所有房间
router.get('/room/all',roomCtr.getAllRoom)

// 修改房间信息
router.put('/room',auth,roomCtr.editRommData)

// 加入房间
router.post('/room/join',auth,roomCtr.joinRoom)

// 离开房间
router.post('/room/quit',auth,roomCtr.quitRoom)

module.exports = router




